/**
 * @file       BaseNetworkConfigPanel.h
 * @brief      TODO
 * @author     Huabo Zheng
 * @date       Feb 3, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#ifndef BASENETWORKCONFIGPANEL_H_
#define BASENETWORKCONFIGPANEL_H_

#include "Panel.h"

namespace NS_LCD_AFW
{
class CIPEditField;
/**
 *NS_LCD_AFW::CBaseNetworkConfigPanel
 */
class CBaseNetworkConfigPanel: public NS_LCD_AFW::CPanel
{
public:
	CBaseNetworkConfigPanel();
protected:
	virtual ~CBaseNetworkConfigPanel();
protected:
	virtual int onCreate();
	virtual int onEnterKeyPress();
	virtual int onEscKeyPress();
	virtual int onUpKeyPress();
	virtual int onDownKeyPress();

	virtual void onSave();
	virtual void onCancel();

public:
	int setIpAddress(const std::string &ipAddr);
	int setNetMask(const std::string &netMaskAddr);
	int setGateway(const std::string &gatewayAddr);
	std::string getIpAddress() const;
	std::string getNetMask() const;
	std::string getGateway() const;
private:
	void onSaveBtnClick(int id, int param);
	void onCancelBtnClick(int id, int param);
private:
	CIPEditField *m_pIpAddress;
	CIPEditField *m_pNetMask;
	CIPEditField *m_pGateWay;

private:
	DISABLE_COPY_CONSTRUCTOR_AND_ASSIGN_REFERENCE(CBaseNetworkConfigPanel);
};
#define IP_ADDRESS "IP Address:"
#define NET_MASK   "Netmask:"
#define GATEWAY_ADDRESS "Gateway Address:"
} /* namespace NS_LCD_AFW */
#endif /* BASENETWORKCONFIGPANEL_H_ */
